package com.gtlab1207.br_awareness.common;

/**
 * @description：接口返回代码
 * @modified By：
 * @version:
 */
public enum Codes {
    PARAMS_NULL(2000, "参数有误"),
    SUCCESS(1, "操作成功"),
    FAILED(-1, "操作失败"),
    HAS_WEB(1001,"信息录入失败，请输入完整信息"),
    NO_LOGIN(-2, "未登录"),
    LOGINED(2,"已登录"),
    NUM_EXIST(3,"账号已存在"),
    LOGIN_FAILED(-3,"登录失败"),
    CODE_ERROR(-4,"验证码错误"),
    TYPE_ERROR(-5,"账号类型错误"),
    NUM_NO_EXIST(-6,"账号不存在"),
    PASS_ERROR(-7,"密码错误"),
    OLD_PASS_ERROR(-8,"旧密码错误"),
    NO_EXIST(1100,"该信息不存在"),
    INSERT_FAILED(1101,"新增失败，请重新录入信息"),
    MOD_FAILED(1102,"修改失败，请重新输入信息"),
    MACHINE_EXIST(1200,"该主机已存在"),
    AUTHENTICATION_FAILED(1201,"主机ip、用户名、密码不匹配，请重试"),
    NO_MACHINE_EXIST(1202,"没有主机可扫描，请先添加主机");

    private int code;
    private String message;

    Codes(int code, String message) {
        this.code = code;
        this.message = message;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
